package org.apache.servicecomb.fence.resource;

import org.apache.servicecomb.fence.api.resource.RocketMqMsg;
import org.apache.servicecomb.fence.api.resource.RocketMqMsgService;
import org.apache.servicecomb.provider.rest.common.RestSchema;
import org.springframework.beans.factory.annotation.Autowired;

@RestSchema(schemaId = "authentication_server_db", schemaInterface = RocketMqMsgService.class)
public class RocketMqMsgEndpoint implements RocketMqMsgService {
    @Autowired
    private RocketMqMsgLogicService rocketMqMsgLogicService;

    @Override
    public RocketMqMsg getByMsgId(String  msgId) {

        return rocketMqMsgLogicService.getByMsgId(msgId);
    }

    @Override
    public int insert(String msgId,String topic,String msgInfo) {

        return rocketMqMsgLogicService.insert(msgId,topic,msgInfo);
    }
}
